package lanqiao.demo;

import java.util.Scanner;

//分类计数
public class Test4 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        char[] chars = s.toCharArray();
        int j=0,q=0,k=0;
        for (int i = 0; i < chars.length; i++) {
            if (Character.isDigit(chars[i])){
                j++;
            }else if (Character.isUpperCase(chars[i])){
                q++;
            }else if (Character.isLowerCase(chars[i])){
                k++;
            }
        }
        System.out.println(q);
        System.out.println(k);
        System.out.println(j);
    }
}
